package com.xiaotu.dao.pgsql;

import com.xiaotu.entity.CityColumn0;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.ArrayTypeHandler;
import tk.mybatis.mapper.common.BaseMapper;

import java.util.List;

/**
 * @author zhangxiao
 * @create 2022-03-03 10:52
 */
public interface PgsqlTitan5WeekMapper extends BaseMapper<CityColumn0> {

    @Select("SELECT * FROM week.tab_city_column_0 WHERE idate = #{idate}")
        //@Results({@Result(column = "itags", javaType = String[].class, typeHandler = ArrayTypeHandler.class)})
    List<CityColumn0> selectList(@Param("idate") String idate);

    @Select("SELECT idate FROM week.tab_city_column_0 GROUP BY idate ORDER BY idate limit 1")
    List<String> getGroupDateList();
}
